package com.yanqu.road.entity.config.promotion.emnus;

public enum ePromotionType {

    PATRONS_PROMOTION_TYPE_1(1, "门客晋升：参数为解锁服装数量条件", ePromotionBigType.PROMOTION_BIG_TYPE_PATRONS.getType()),
    PATRONS_PROMOTION_TYPE_2(2, "门客晋升：参数为解锁所需服装ID列表 与类型 : 109500;109501;109502", ePromotionBigType.PROMOTION_BIG_TYPE_PATRONS.getType()),
    PATRONS_PROMOTION_TYPE_3(3, "门客晋升：参数格式选择数量+皮肤ID列表 : 2-109500|109501|109502|109503", ePromotionBigType.PROMOTION_BIG_TYPE_PATRONS.getType()),
    PATRONS_PROMOTION_TYPE_4(4, "门客晋升： 类型3的进阶版本,竖线之间的只要满足任意1个就行，但是最多也只算1个", ePromotionBigType.PROMOTION_BIG_TYPE_PATRONS.getType()),
    PATRONS_PROMOTION_TYPE_5(5, "门客晋升：技能id=技能等级", ePromotionBigType.PROMOTION_BIG_TYPE_PATRONS.getType()),
    PATRONS_PROMOTION_TYPE_6(6, "门客晋升：道具id=数量", ePromotionBigType.PROMOTION_BIG_TYPE_PATRONS.getType()),
    BEAUTY_PROMOTION_TYPE_11(11, "美女晋升： 晋升条件=技能id1=升级条件#升级条件\n" +
            "     示例配置：1;1|4;1=60101=1;2|4;2#1;3|4;3\n" +
            "     解锁技能60101\n" +
            "     晋升条件：1件强化等级≥1的无双皮肤| 4件强化等级≥1的普通皮肤\n" +
            "     升级条件：1件强化等级≥2的无双皮肤| 4件强化等级≥2的普通皮肤#下一级条件", ePromotionBigType.PROMOTION_BIG_TYPE_BEAUTY.getType()),
    BEAUTY_PROMOTION_TYPE_12(12, "美女晋升：x件强化等级≥1的无双皮肤| x件强化等级≥1的普通皮肤", ePromotionBigType.PROMOTION_BIG_TYPE_BEAUTY.getType()),
    BEAUTY_PROMOTION_TYPE_13(13, "美女晋升：晋升技能；缘定三生|缘定三生等级；缘定三生等级；缘定三生等级；缘定三生等级；缘定三生等级", ePromotionBigType.PROMOTION_BIG_TYPE_BEAUTY.getType());

    /**
     * 类型
     */
    private int type;

    /**
     * 名称
     */
    private String name;

    private int bigType;

    ePromotionType(int type, String name, int bigType) {
        this.type = type;
        this.name = name;
        this.bigType = bigType;
    }

    public int getType() {
        return type;
    }

    public String getName() {
        return name;
    }

    public int getBigType() {
        return bigType;
    }

    /**
     * 获取大类型
     * @param type
     * @return
     */
    public static int getBigType(int type) {
    	for (ePromotionType promotionTypeEnum : ePromotionType.values()) {
            if (promotionTypeEnum.getType() == type) {
                return promotionTypeEnum.getBigType();
            }
        }
        return 0;
    }
}
